<?php 


//获取匹配公式的值
function gxk3_num_to_gongshi($num=1){
	$gongshi_m = 'Gxk3Tj'.$num;
	return $gongshi_m;
}

//获取匹配位数的值
function gxk3_num_to_weishu($weishu){
	switch ($weishu) {
		case 1:
			$weishu_arr['weishu'] = 'one';
			$weishu_arr['hs'] = 'h1';
			break;
		case 2:
			$weishu_arr['weishu'] = 'two';
			$weishu_arr['hs'] = 'h2';
			break;
		default:
			$weishu_arr['weishu'] = 'three';
			$weishu_arr['hs'] = 'h3';
			break;
	}
	return $weishu_arr;
}

// 获取当天的所有推荐
function gxk3_get_new_tj($gongshi_m='Gxk3Tj1'){
	$tjsjModel = D ($gongshi_m);
	$where_code_key_info = $tjsjModel->limit(500,1)->order('code_key desc')->select();
	
	$where_code_key = $where_code_key_info[0]['code_key'];
	if($where_code_key!=null){
		$where ['code_key'] = array ('gt',$where_code_key);
	}else{
		$where ['code_key']=array ('neq','');
	}
	$result_tjsj = $tjsjModel->where ( $where )->order ( 'code_key asc' )->relation ( true )->select ();
	return $result_tjsj;
	
}

function gxk3_get_dm_data($result_tjsj,$weishu_arr,$disnum,$zhouqi){
	if($disnum>6){
		$disnum=6;
	}
	$result_arr = array ();
	for($i = 0; $i < count ( $result_tjsj ); $i ++) {
		
		//获取前定位数字
		$ycs = explode(",", $result_tjsj[$i][$weishu_arr['weishu']]);
		$yc_ges = array();
		
		for($j=0;$j<$disnum;$j++){
			array_push($yc_ges,$ycs[$j]);
		}
		//排序,小到大
		sort($yc_ges);
		$yc_ge = implode(",",$yc_ges); //位数预测
		$i_bq =$result_tjsj [$i] ['code_key'];
		//对预测值进行排序
		$data ['yc'] = $yc_ge;
		$data ['jiqj'] = $i_bq.'-'.($i_bq+$zhouqi-1).'期';
		// 对已开奖的结算
		$max = $i + $zhouqi - 1;
		
		if ($result_tjsj[$max]['code'] != null) {// 没开奖的不能统计
			
			if ($zhouqi == 1) {
				if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-'.$i_bq.'期-'.$result_tjsj [$i]['code'] ['hm'];
				} else {
					$jieguo = '挂';
					$jiezhi = '第1期-' .$i_bq.'期-' . $result_tjsj [$i] ['code'] ['hm'];
				}
			} else if ($zhouqi == 2) {
				if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第2期-' .($i_bq+1). '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else {
					$jieguo = '挂';
					$jiezhi = '第2期-' .($i_bq+1). '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				}
			} else if ($zhouqi == 3) {
				if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else {
					$jieguo = '挂';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				}
			} else if ($zhouqi == 4) {
				if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else {
					$jieguo = '挂';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				}
			} else if ($zhouqi == 5) {
				if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第2期-' .($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2). '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第5期-' . ($i_bq+4). '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				} else {
					$jieguo = '挂';
					$jiezhi = '第5期-' . ($i_bq+4). '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				}
			} else if ($zhouqi == 6) {
				if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第4期-' .($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第5期-' . ($i_bq+4). '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				} else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
					$i = $i + 5;
				}else {
					$jieguo = '挂';
					$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
					$i = $i + 5;
				}
			} else if ($zhouqi == 7) {
				if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				} else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
					$i = $i + 5;
				}else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
					$i = $i + 6;
				}else {
					$jieguo = '挂';
					$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
					$i = $i + 6;
				}
			}else if ($zhouqi == 8) {
				if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				} else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
					$i = $i + 5;
				}else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
					$i = $i + 6;
				}else if (in_array($result_tjsj [$i +7] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第8期-' . ($i_bq+7) . '期-' . $result_tjsj [$i + 7] ['code'] ['hm'];
					$i = $i + 7;
				}else {
					$jieguo = '挂';
					$jiezhi = '第8期-' . ($i_bq+7) . '期-' . $result_tjsj [$i + 7] ['code'] ['hm'];
					$i = $i + 7;
				}
			}else if ($zhouqi == 9) {
				if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				} else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
					$i = $i + 5;
				}else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
					$i = $i + 6;
				}else if (in_array($result_tjsj [$i +7] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第8期-' . ($i_bq+7) . '期-' . $result_tjsj [$i + 7] ['code'] ['hm'];
					$i = $i + 7;
				}else if (in_array($result_tjsj [$i +8] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第9期-' . ($i_bq+8) . '期-' . $result_tjsj [$i + 8] ['code'] ['hm'];
					$i = $i + 8;
				}else {
					$jieguo = '挂';
					$jiezhi = '第9期-' . ($i_bq+8) . '期-' . $result_tjsj [$i + 8] ['code'] ['hm'];
					$i = $i + 8;
				}
			}else if ($zhouqi == 10) {
				if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				} else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
					$i = $i + 5;
				}else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
					$i = $i + 6;
				}else if (in_array($result_tjsj [$i +7] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第8期-' . ($i_bq+7) . '期-' . $result_tjsj [$i + 7] ['code'] ['hm'];
					$i = $i + 7;
				}else if (in_array($result_tjsj [$i +8] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第9期-' . ($i_bq+8) . '期-' . $result_tjsj [$i + 8] ['code'] ['hm'];
					$i = $i + 8;
				}else if (in_array($result_tjsj [$i +9] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
					$jieguo = '中';
					$jiezhi = '第10期-' . ($i_bq+9) . '期-' . $result_tjsj [$i + 9] ['code'] ['hm'];
					$i = $i + 9;
				}else {
					$jieguo = '挂';
					$jiezhi = '第10期-' . ($i_bq+9) . '期-' . $result_tjsj [$i + 9] ['code'] ['hm'];
					$i = $i + 9;
				}
			}
	
	
			// 计划结果,第一期不中则第二期，中则从下期开始重新推荐，如果三期都不中，则从下期重新推荐
			$data ['jiezhi'] = $jiezhi;
			$data ['jieguo'] = $jieguo;
			array_push ( $result_arr, $data );
		} else {
			// 算周期
			if ($zhouqi == 1) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				}
				array_push ( $result_arr, $data );
			} else if ($zhouqi == 2) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				}
				array_push ( $result_arr, $data );
			} else if ($zhouqi == 3) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				}
				array_push ( $result_arr, $data );
			} else if ($zhouqi == 4) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq) ) ) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
						$i = $i + 3;
					}
				}
				array_push ( $result_arr, $data );
			} else if ($zhouqi == 5) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
						$i = $i + 3;
					}
				} else if ($result_tjsj [$i + 4] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
						$i = $i + 4;
					}
				}
				array_push ( $result_arr, $data );
			}else if ($zhouqi == 6) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
						$i = $i + 3;
					}
				} else if ($result_tjsj [$i + 4] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
						$i = $i + 4;
					}
				} else if ($result_tjsj [$i + 5] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
						$i = $i + 5;
					}
				}
				array_push ( $result_arr, $data );
			}else if ($zhouqi == 7) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
						$i = $i + 3;
					}
				} else if ($result_tjsj [$i + 4] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
						$i = $i + 4;
					}
				} else if ($result_tjsj [$i + 5] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
						$i = $i + 5;
					}
				} else if ($result_tjsj [$i + 6] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期进行中...';
						$i = $i + 6;
					}
				}
				array_push ( $result_arr, $data );
			}else if ($zhouqi ==8) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
						$i = $i + 3;
					}
				} else if ($result_tjsj [$i + 4] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
						$i = $i + 4;
					}
				} else if ($result_tjsj [$i + 5] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
						$i = $i + 5;
					}
				} else if ($result_tjsj [$i + 6] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期进行中...';
						$i = $i + 6;
					}
				}else if ($result_tjsj [$i + 7] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					}  else if (in_array($result_tjsj [$i +7] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
						$i = $i + 7;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期进行中...';
						$i = $i + 7;
					}
				}
				array_push ( $result_arr, $data );
			}else if ($zhouqi ==9) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq) ) ) . '期进行中...';
						$i = $i + 3;
					}
				} else if ($result_tjsj [$i + 4] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
						$i = $i + 4;
					}
				} else if ($result_tjsj [$i + 5] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
						$i = $i + 5;
					}
				} else if ($result_tjsj [$i + 6] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期进行中...';
						$i = $i + 6;
					}
				}else if ($result_tjsj [$i + 7] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					}  else if (in_array($result_tjsj [$i +7] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
						$i = $i + 7;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期进行中...';
						$i = $i + 7;
					}
				}else if ($result_tjsj [$i + 8] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					}  else if (in_array($result_tjsj [$i +7] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
						$i = $i + 7;
					}  else if (in_array($result_tjsj [$i +8] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期-' . $result_tjsj [$i+8] ['code'] ['hm'];
						$i = $i + 8;
					}else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期进行中...';
						$i = $i + 8;
					}
				}
				array_push ( $result_arr, $data );
			}else if ($zhouqi ==10) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
						$i = $i + 3;
					}
				} else if ($result_tjsj [$i + 4] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
						$i = $i + 4;
					}
				} else if ($result_tjsj [$i + 5] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
						$i = $i + 5;
					}
				} else if ($result_tjsj [$i + 6] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期进行中...';
						$i = $i + 6;
					}
				}else if ($result_tjsj [$i + 7] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					}  else if (in_array($result_tjsj [$i +7] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
						$i = $i + 7;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期进行中...';
						$i = $i + 7;
					}
				}else if ($result_tjsj [$i + 8] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					}  else if (in_array($result_tjsj [$i +7] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
						$i = $i + 7;
					}  else if (in_array($result_tjsj [$i +8] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期-' . $result_tjsj [$i+8] ['code'] ['hm'];
						$i = $i + 8;
					}else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期进行中...';
						$i = $i + 8;
					}
				}else if ($result_tjsj [$i + 9] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					}  else if (in_array($result_tjsj [$i +7] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
						$i = $i + 7;
					}  else if (in_array($result_tjsj [$i +8] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期-' . $result_tjsj [$i+8] ['code'] ['hm'];
						$i = $i + 8;
					}  else if (in_array($result_tjsj [$i +9] ['code'][$weishu_arr['hs']],$yc_ges) !== false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第10期-' . ($i_bq + 9) . '期-' . $result_tjsj [$i+9] ['code'] ['hm'];
						$i = $i + 9;
					}else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第10期-' . ($i_bq + 9) . '期进行中...';
						$i = $i + 9;
					}
				}
				array_push ( $result_arr, $data );
			}
		}
	}
	return $result_arr;
	}

//获取大小统计结果
function gxk3_get_daxiao_data($result_tjsj,$weishu_arr,$disnum,$zhouqi){
	
	if($disnum>6){
		$disnum=6;
	}
	$result_arr = array ();
	for($i = 0; $i < count ( $result_tjsj ); $i ++) {
		
		//获取前定位数字
		$ycs = explode(",", $result_tjsj[$i][$weishu_arr['weishu']]);
		$yc_ge = $ycs[$disnum]; //位数预测
		
		$i_bq =$result_tjsj [$i] ['code_key'];
		$zjs = 4;//中间数
		if($yc_ge>=$zjs){
			$yc_ge_dx = '大';
		}else {
			$yc_ge_dx = '小';
		}
		
		$data ['yc'] = $yc_ge_dx;
		$data ['jiqj'] = $i_bq.'-'.($i_bq+$zhouqi-1).'期';
			
		$max = $i + $zhouqi - 1;
		if ($result_tjsj [$max] ['code'] != null) { // 没开奖的不能统计
		
			if ($zhouqi == 1) {
				if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)){
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else {
					$jieguo = '挂';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				}
			} else if ($zhouqi == 2) {
				if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else {
					$jieguo = '挂';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				}
			} else if ($zhouqi == 3) {
				if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else {
					$jieguo = '挂';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				}
			} else if ($zhouqi == 4) {
				if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else {
					$jieguo = '挂';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				}
			} else if ($zhouqi == 5) {
				if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				} else {
					$jieguo = '挂';
					$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				}
			} else if ($zhouqi == 6) {
				if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				} else if(($yc_ge>=$zjs) == ($result_tjsj[$i+5]['code'][$weishu_arr['hs']]>=$zjs)){
					$jieguo = '中';
					$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
					$i = $i + 5;
				}else {
					$jieguo = '挂';
					$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
					$i = $i + 5;
				}
			} else if ($zhouqi == 7) {
				if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				} else if(($yc_ge>=$zjs) == ($result_tjsj[$i+5]['code'][$weishu_arr['hs']]>=$zjs)){
					$jieguo = '中';
					$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
					$i = $i + 5;
				}else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+6]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
					$i = $i + 6;
				}else {
					$jieguo = '挂';
					$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
					$i = $i + 6;
				}
			}else if ($zhouqi == 8) {
				if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				} else if(($yc_ge>=$zjs) == ($result_tjsj[$i+5]['code'][$weishu_arr['hs']]>=$zjs)){
					$jieguo = '中';
					$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
					$i = $i + 5;
				}else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+6]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
					$i = $i + 6;
				}else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+7]['code'][$weishu_arr['hs']]>=$zjs)){
					$jieguo = '中';
					$jiezhi = '第8期-' . ($i_bq+7) . '期-' . $result_tjsj [$i + 7] ['code'] ['hm'];
					$i = $i + 7;
				}else {
					$jieguo = '挂';
					$jiezhi = '第8期-' . ($i_bq+7) . '期-' . $result_tjsj [$i + 7] ['code'] ['hm'];
					$i = $i + 7;
				}
			}else if ($zhouqi == 9) {
				if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				} else if(($yc_ge>=$zjs) == ($result_tjsj[$i+5]['code'][$weishu_arr['hs']]>=$zjs)){
					$jieguo = '中';
					$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
					$i = $i + 5;
				}else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+6]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
					$i = $i + 6;
				}else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+7]['code'][$weishu_arr['hs']]>=$zjs)){
					$jieguo = '中';
					$jiezhi = '第8期-' . ($i_bq+7) . '期-' . $result_tjsj [$i + 7] ['code'] ['hm'];
					$i = $i + 7;
				}else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+8]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第9期-' . ($i_bq+8) . '期-' . $result_tjsj [$i + 8] ['code'] ['hm'];
					$i = $i + 8;
				}else {
					$jieguo = '挂';
					$jiezhi = '第9期-' . ($i_bq+8) . '期-' . $result_tjsj [$i + 8] ['code'] ['hm'];
					$i = $i + 8;
				}
			}else if ($zhouqi == 10) {
				if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				} else if(($yc_ge>=$zjs) == ($result_tjsj[$i+5]['code'][$weishu_arr['hs']]>=$zjs)){
					$jieguo = '中';
					$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
					$i = $i + 5;
				}else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+6]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
					$i = $i + 6;
				}else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+7]['code'][$weishu_arr['hs']]>=$zjs)){
					$jieguo = '中';
					$jiezhi = '第8期-' . ($i_bq+7) . '期-' . $result_tjsj [$i + 7] ['code'] ['hm'];
					$i = $i + 7;
				}else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+8]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第9期-' . ($i_bq+8) . '期-' . $result_tjsj [$i + 8] ['code'] ['hm'];
					$i = $i + 8;
				}else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+9]['code'][$weishu_arr['hs']]>=$zjs)) {
					$jieguo = '中';
					$jiezhi = '第10期-' . ($i_bq+9) . '期-' . $result_tjsj [$i + 9] ['code'] ['hm'];
					$i = $i + 9;
				}else {
					$jieguo = '挂';
					$jiezhi = '第10期-' . ($i_bq+9) . '期-' . $result_tjsj [$i + 9] ['code'] ['hm'];
					$i = $i + 9;
				}
			}
	
	
			// 计划结果,第一期不中则第二期，中则从下期开始重新推荐，如果三期都不中，则从下期重新推荐
			$data ['jiezhi'] = $jiezhi;
			$data ['jieguo'] = $jieguo;
			array_push ( $result_arr, $data );
		} else {
			// 算周期
			if ($zhouqi == 1) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				}
				array_push ( $result_arr, $data );
			} else if ($zhouqi == 2) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				}
				array_push ( $result_arr, $data );
			} else if ($zhouqi == 3) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				}
				array_push ( $result_arr, $data );
			} else if ($zhouqi == 4) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq) ) ) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
						$i = $i + 3;
					}
				}
				array_push ( $result_arr, $data );
			} else if ($zhouqi == 5) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
						$i = $i + 3;
					}
				} else if ($result_tjsj [$i + 4] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
						$i = $i + 4;
					}
				}
				array_push ( $result_arr, $data );
			}else if ($zhouqi == 6) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
						$i = $i + 3;
					}
				} else if ($result_tjsj [$i + 4] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
						$i = $i + 4;
					}
				} else if ($result_tjsj [$i + 5] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if(($yc_ge>=$zjs) == ($result_tjsj[$i+5]['code'][$weishu_arr['hs']]>=$zjs)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
						$i = $i + 5;
					}
				}
				array_push ( $result_arr, $data );
			}else if ($zhouqi == 7) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
						$i = $i + 3;
					}
				} else if ($result_tjsj [$i + 4] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
						$i = $i + 4;
					}
				} else if ($result_tjsj [$i + 5] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if(($yc_ge>=$zjs) == ($result_tjsj[$i+5]['code'][$weishu_arr['hs']]>=$zjs)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
						$i = $i + 5;
					}
				} else if ($result_tjsj [$i + 6] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if(($yc_ge>=$zjs) == ($result_tjsj[$i+5]['code'][$weishu_arr['hs']]>=$zjs)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+6]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期进行中...';
						$i = $i + 6;
					}
				}
				array_push ( $result_arr, $data );
			}else if ($zhouqi ==8) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
						$i = $i + 3;
					}
				} else if ($result_tjsj [$i + 4] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
						$i = $i + 4;
					}
				} else if ($result_tjsj [$i + 5] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if(($yc_ge>=$zjs) == ($result_tjsj[$i+5]['code'][$weishu_arr['hs']]>=$zjs)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
						$i = $i + 5;
					}
				} else if ($result_tjsj [$i + 6] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if(($yc_ge>=$zjs) == ($result_tjsj[$i+5]['code'][$weishu_arr['hs']]>=$zjs)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+6]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期进行中...';
						$i = $i + 6;
					}
				}else if ($result_tjsj [$i + 7] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if(($yc_ge>=$zjs) == ($result_tjsj[$i+5]['code'][$weishu_arr['hs']]>=$zjs)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+6]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					}  else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+7]['code'][$weishu_arr['hs']]>=$zjs)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
						$i = $i + 7;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期进行中...';
						$i = $i + 7;
					}
				}
				array_push ( $result_arr, $data );
			}else if ($zhouqi ==9) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq) ) ) . '期进行中...';
						$i = $i + 3;
					}
				} else if ($result_tjsj [$i + 4] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
						$i = $i + 4;
					}
				} else if ($result_tjsj [$i + 5] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if(($yc_ge>=$zjs) == ($result_tjsj[$i+5]['code'][$weishu_arr['hs']]>=$zjs)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
						$i = $i + 5;
					}
				} else if ($result_tjsj [$i + 6] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if(($yc_ge>=$zjs) == ($result_tjsj[$i+5]['code'][$weishu_arr['hs']]>=$zjs)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+6]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期进行中...';
						$i = $i + 6;
					}
				}else if ($result_tjsj [$i + 7] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if(($yc_ge>=$zjs) == ($result_tjsj[$i+5]['code'][$weishu_arr['hs']]>=$zjs)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+6]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					}  else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+7]['code'][$weishu_arr['hs']]>=$zjs)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
						$i = $i + 7;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期进行中...';
						$i = $i + 7;
					}
				}else if ($result_tjsj [$i + 8] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if(($yc_ge>=$zjs) == ($result_tjsj[$i+5]['code'][$weishu_arr['hs']]>=$zjs)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+6]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					}  else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+7]['code'][$weishu_arr['hs']]>=$zjs)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
						$i = $i + 7;
					}  else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+8]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期-' . $result_tjsj [$i+8] ['code'] ['hm'];
						$i = $i + 8;
					}else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期进行中...';
						$i = $i + 8;
					}
				}
				array_push ( $result_arr, $data );
			}else if ($zhouqi ==10) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
						$i = $i + 3;
					}
				} else if ($result_tjsj [$i + 4] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
						$i = $i + 4;
					}
				} else if ($result_tjsj [$i + 5] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if(($yc_ge>=$zjs) == ($result_tjsj[$i+5]['code'][$weishu_arr['hs']]>=$zjs)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
						$i = $i + 5;
					}
				} else if ($result_tjsj [$i + 6] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if(($yc_ge>=$zjs) == ($result_tjsj[$i+5]['code'][$weishu_arr['hs']]>=$zjs)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+6]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期进行中...';
						$i = $i + 6;
					}
				}else if ($result_tjsj [$i + 7] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if(($yc_ge>=$zjs) == ($result_tjsj[$i+5]['code'][$weishu_arr['hs']]>=$zjs)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+6]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					}  else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+7]['code'][$weishu_arr['hs']]>=$zjs)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
						$i = $i + 7;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期进行中...';
						$i = $i + 7;
					}
				}else if ($result_tjsj [$i + 8] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if(($yc_ge>=$zjs) == ($result_tjsj[$i+5]['code'][$weishu_arr['hs']]>=$zjs)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+6]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					}  else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+7]['code'][$weishu_arr['hs']]>=$zjs)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
						$i = $i + 7;
					}  else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+8]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期-' . $result_tjsj [$i+8] ['code'] ['hm'];
						$i = $i + 8;
					}else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期进行中...';
						$i = $i + 8;
					}
				}else if ($result_tjsj [$i + 9] ['code'] == null) {
					if( ($yc_ge>=$zjs) == ($result_tjsj[$i]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+1]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+2]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+3]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+4]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if(($yc_ge>=$zjs) == ($result_tjsj[$i+5]['code'][$weishu_arr['hs']]>=$zjs)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+6]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					}  else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+7]['code'][$weishu_arr['hs']]>=$zjs)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
						$i = $i + 7;
					}  else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+8]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期-' . $result_tjsj [$i+8] ['code'] ['hm'];
						$i = $i + 8;
					}  else if( ($yc_ge>=$zjs) == ($result_tjsj[$i+9]['code'][$weishu_arr['hs']]>=$zjs)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第10期-' . ($i_bq + 9) . '期-' . $result_tjsj [$i+9] ['code'] ['hm'];
						$i = $i + 9;
					}else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第10期-' . ($i_bq + 9) . '期进行中...';
						$i = $i + 9;
					}
				}
				array_push ( $result_arr, $data );
			}
		}
	}
	return $result_arr;
}
// //获取单双统计结果
function gxk3_get_danshuang_data($result_tjsj,$weishu_arr,$disnum,$zhouqi){
	if($disnum>6){
		$disnum=6;
	}
	$result_arr = array ();
	for($i = 0; $i < count ( $result_tjsj ); $i ++) {
		
		//获取前定位数字
		$ycs = explode(",", $result_tjsj[$i][$weishu_arr['weishu']]);
		$yc_ge = $ycs[$disnum]; //位数预测
		
		$i_bq = ( int )$result_tjsj [$i]['code_key'];
		
		$yc_ge_ds = '';
		if($yc_ge%2==0){
			$yc_ge_ds = '双';
		}else {
			$yc_ge_ds = '单';
		}
		$data ['yc'] = $yc_ge_ds;
		$data ['jiqj'] = $i_bq.'-'.($i_bq+$zhouqi-1).'期';
			
		// 对已开奖的结算
		$max = $i + $zhouqi - 1;
		if ($result_tjsj [$max] ['code'] != null) { // 没开奖的不能统计
	
			if ($zhouqi == 1) {
				if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else {
					$jieguo = '挂';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				}
			} else if ($zhouqi == 2) {
				if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else {
					$jieguo = '挂';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				}
			} else if ($zhouqi == 3) {
				if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else {
					$jieguo = '挂';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				}
			} else if ($zhouqi == 4) {
				if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else {
					$jieguo = '挂';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				}
			} else if ($zhouqi == 5) {
				if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				} else {
					$jieguo = '挂';
					$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				}
			} else if ($zhouqi == 6) {
				if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
					$jieguo = '中';
					$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
					$i = $i + 5;
				}else {
					$jieguo = '挂';
					$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
					$i = $i + 5;
				}
			} else if ($zhouqi == 7) {
				if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
					$jieguo = '中';
					$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
					$i = $i + 5;
				}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
					$i = $i + 6;
				}else {
					$jieguo = '挂';
					$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
					$i = $i + 6;
				}
			}else if ($zhouqi == 8) {
				if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
					$jieguo = '中';
					$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
					$i = $i + 5;
				}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
					$i = $i + 6;
				}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+7] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
					$jieguo = '中';
					$jiezhi = '第8期-' . ($i_bq+7) . '期-' . $result_tjsj [$i + 7] ['code'] ['hm'];
					$i = $i + 7;
				}else {
					$jieguo = '挂';
					$jiezhi = '第8期-' . ($i_bq+7) . '期-' . $result_tjsj [$i + 7] ['code'] ['hm'];
					$i = $i + 7;
				}
			}else if ($zhouqi == 9) {
				if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
					$jieguo = '中';
					$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
					$i = $i + 5;
				}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
					$i = $i + 6;
				}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+7] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
					$jieguo = '中';
					$jiezhi = '第8期-' . ($i_bq+7) . '期-' . $result_tjsj [$i + 7] ['code'] ['hm'];
					$i = $i + 7;
				}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+8] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第9期-' . ($i_bq+8) . '期-' . $result_tjsj [$i + 8] ['code'] ['hm'];
					$i = $i + 8;
				}else {
					$jieguo = '挂';
					$jiezhi = '第9期-' . ($i_bq+8) . '期-' . $result_tjsj [$i + 8] ['code'] ['hm'];
					$i = $i + 8;
				}
			}else if ($zhouqi == 10) {
				if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
					$jieguo = '中';
					$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
					$i = $i + 5;
				}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
					$i = $i + 6;
				}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+7] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
					$jieguo = '中';
					$jiezhi = '第8期-' . ($i_bq+7) . '期-' . $result_tjsj [$i + 7] ['code'] ['hm'];
					$i = $i + 7;
				}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+8] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第9期-' . ($i_bq+8) . '期-' . $result_tjsj [$i + 8] ['code'] ['hm'];
					$i = $i + 8;
				}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+9] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					$jieguo = '中';
					$jiezhi = '第10期-' . ($i_bq+9) . '期-' . $result_tjsj [$i + 9] ['code'] ['hm'];
					$i = $i + 9;
				}else {
					$jieguo = '挂';
					$jiezhi = '第10期-' . ($i_bq+9) . '期-' . $result_tjsj [$i + 9] ['code'] ['hm'];
					$i = $i + 9;
				}
			}
	
	
			// 计划结果,第一期不中则第二期，中则从下期开始重新推荐，如果三期都不中，则从下期重新推荐
			$data ['jiezhi'] = $jiezhi;
			$data ['jieguo'] = $jieguo;
			array_push ( $result_arr, $data );
		} else {
			// 算周期
			if ($zhouqi == 1) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				}
				array_push ( $result_arr, $data );
			} else if ($zhouqi == 2) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				}
				array_push ( $result_arr, $data );
			} else if ($zhouqi == 3) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				}
				array_push ( $result_arr, $data );
			} else if ($zhouqi == 4) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq) ) ) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
						$i = $i + 3;
					}
				}
				array_push ( $result_arr, $data );
			} else if ($zhouqi == 5) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
						$i = $i + 3;
					}
				} else if ($result_tjsj [$i + 4] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
						$i = $i + 4;
					}
				}
				array_push ( $result_arr, $data );
			}else if ($zhouqi == 6) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
						$i = $i + 3;
					}
				} else if ($result_tjsj [$i + 4] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
						$i = $i + 4;
					}
				} else if ($result_tjsj [$i + 5] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
						$i = $i + 5;
					}
				}
				array_push ( $result_arr, $data );
			}else if ($zhouqi == 7) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
						$i = $i + 3;
					}
				} else if ($result_tjsj [$i + 4] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
						$i = $i + 4;
					}
				} else if ($result_tjsj [$i + 5] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
						$i = $i + 5;
					}
				} else if ($result_tjsj [$i + 6] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期进行中...';
						$i = $i + 6;
					}
				}
				array_push ( $result_arr, $data );
			}else if ($zhouqi ==8) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
						$i = $i + 3;
					}
				} else if ($result_tjsj [$i + 4] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
						$i = $i + 4;
					}
				} else if ($result_tjsj [$i + 5] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
						$i = $i + 5;
					}
				} else if ($result_tjsj [$i + 6] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期进行中...';
						$i = $i + 6;
					}
				}else if ($result_tjsj [$i + 7] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+7] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
						$i = $i + 7;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期进行中...';
						$i = $i + 7;
					}
				}
				array_push ( $result_arr, $data );
			}else if ($zhouqi ==9) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq) ) ) . '期进行中...';
						$i = $i + 3;
					}
				} else if ($result_tjsj [$i + 4] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
						$i = $i + 4;
					}
				} else if ($result_tjsj [$i + 5] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
						$i = $i + 5;
					}
				} else if ($result_tjsj [$i + 6] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期进行中...';
						$i = $i + 6;
					}
				}else if ($result_tjsj [$i + 7] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+7] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
						$i = $i + 7;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期进行中...';
						$i = $i + 7;
					}
				}else if ($result_tjsj [$i + 8] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+7] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
						$i = $i + 7;
					}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+8] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期-' . $result_tjsj [$i+8] ['code'] ['hm'];
						$i = $i + 8;
					}else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期进行中...';
						$i = $i + 8;
					}
				}
				array_push ( $result_arr, $data );
			}else if ($zhouqi ==10) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
						$i = $i + 3;
					}
				} else if ($result_tjsj [$i + 4] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
						$i = $i + 4;
					}
				} else if ($result_tjsj [$i + 5] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
						$i = $i + 5;
					}
				} else if ($result_tjsj [$i + 6] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期进行中...';
						$i = $i + 6;
					}
				}else if ($result_tjsj [$i + 7] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+7] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
						$i = $i + 7;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期进行中...';
						$i = $i + 7;
					}
				}else if ($result_tjsj [$i + 8] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+7] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
						$i = $i + 7;
					}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+8] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期-' . $result_tjsj [$i+8] ['code'] ['hm'];
						$i = $i + 8;
					}else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期进行中...';
						$i = $i + 8;
					}
				}else if ($result_tjsj [$i + 9] ['code'] == null) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+7] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
						$i = $i + 7;
					}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+8] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期-' . $result_tjsj [$i+8] ['code'] ['hm'];
						$i = $i + 8;
					}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+9] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第10期-' . ($i_bq + 9) . '期-' . $result_tjsj [$i+9] ['code'] ['hm'];
						$i = $i + 9;
					}else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第10期-' . ($i_bq + 9) . '期进行中...';
						$i = $i + 9;
					}
				}
				array_push ( $result_arr, $data );
			}
		}
	}
	return $result_arr;
}



function gxk3_get_sm_data($result_tjsj,$weishu_arr,$disnum,$zhouqi){

	$result_arr = array ();
	for($i = 0; $i < count ( $result_tjsj ); $i ++) {
		//获取前定位数字
		$ycs = explode(",", $result_tjsj[$i][$weishu_arr['weishu']]);
		$ycs = array_reverse($ycs);//数组倒序
		$yc_ges = array();
		for($j=0;$j<$disnum;$j++){
			array_push($yc_ges,$ycs[$j]);
		}
		//排序,小到大
		sort($yc_ges);
		$yc_ge = implode(",",$yc_ges); //位数预测
		$i_bq =$result_tjsj [$i] ['code_key'];
		//对预测值进行排序
		$data ['yc'] = $yc_ge;
		$data ['jiqj'] = $i_bq.'-'.($i_bq+$zhouqi-1).'期';
		// 对已开奖的结算
		$max = $i + $zhouqi - 1;

		if ($result_tjsj[$max]['code'] != null) {// 没开奖的不能统计

			if ($zhouqi == 1) {
				if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-'.$i_bq.'期-'.$result_tjsj [$i]['code'] ['hm'];
				} else {
					$jieguo = '挂';
					$jiezhi = '第1期-' .$i_bq.'期-' . $result_tjsj [$i] ['code'] ['hm'];
				}
			} else if ($zhouqi == 2) {
				if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第2期-' .($i_bq+1). '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else {
					$jieguo = '挂';
					$jiezhi = '第2期-' .($i_bq+1). '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				}
			} else if ($zhouqi == 3) {
				if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else {
					$jieguo = '挂';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				}
			} else if ($zhouqi == 4) {
				if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else {
					$jieguo = '挂';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				}
			} else if ($zhouqi == 5) {
				if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第2期-' .($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2). '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第5期-' . ($i_bq+4). '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				} else {
					$jieguo = '挂';
					$jiezhi = '第5期-' . ($i_bq+4). '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				}
			} else if ($zhouqi == 6) {
				if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第4期-' .($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第5期-' . ($i_bq+4). '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				} else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
					$i = $i + 5;
				}else {
					$jieguo = '挂';
					$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
					$i = $i + 5;
				}
			} else if ($zhouqi == 7) {
				if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				} else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
					$i = $i + 5;
				}else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
					$i = $i + 6;
				}else {
					$jieguo = '挂';
					$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
					$i = $i + 6;
				}
			}else if ($zhouqi == 8) {
				if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				} else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
					$i = $i + 5;
				}else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
					$i = $i + 6;
				}else if (in_array($result_tjsj [$i +7] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第8期-' . ($i_bq+7) . '期-' . $result_tjsj [$i + 7] ['code'] ['hm'];
					$i = $i + 7;
				}else {
					$jieguo = '挂';
					$jiezhi = '第8期-' . ($i_bq+7) . '期-' . $result_tjsj [$i + 7] ['code'] ['hm'];
					$i = $i + 7;
				}
			}else if ($zhouqi == 9) {
				if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				} else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
					$i = $i + 5;
				}else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
					$i = $i + 6;
				}else if (in_array($result_tjsj [$i +7] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第8期-' . ($i_bq+7) . '期-' . $result_tjsj [$i + 7] ['code'] ['hm'];
					$i = $i + 7;
				}else if (in_array($result_tjsj [$i +8] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第9期-' . ($i_bq+8) . '期-' . $result_tjsj [$i + 8] ['code'] ['hm'];
					$i = $i + 8;
				}else {
					$jieguo = '挂';
					$jiezhi = '第9期-' . ($i_bq+8) . '期-' . $result_tjsj [$i + 8] ['code'] ['hm'];
					$i = $i + 8;
				}
			}else if ($zhouqi == 10) {
				if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					// 计划结果
					$jieguo = '中';
					$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
				} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
					$i = $i + 1;
				} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
					$i = $i + 2;
				} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
					$i = $i + 3;
				} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
					$i = $i + 4;
				} else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
					$i = $i + 5;
				}else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
					$i = $i + 6;
				}else if (in_array($result_tjsj [$i +7] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第8期-' . ($i_bq+7) . '期-' . $result_tjsj [$i + 7] ['code'] ['hm'];
					$i = $i + 7;
				}else if (in_array($result_tjsj [$i +8] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第9期-' . ($i_bq+8) . '期-' . $result_tjsj [$i + 8] ['code'] ['hm'];
					$i = $i + 8;
				}else if (in_array($result_tjsj [$i +9] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
					$jieguo = '中';
					$jiezhi = '第10期-' . ($i_bq+9) . '期-' . $result_tjsj [$i + 9] ['code'] ['hm'];
					$i = $i + 9;
				}else {
					$jieguo = '挂';
					$jiezhi = '第10期-' . ($i_bq+9) . '期-' . $result_tjsj [$i + 9] ['code'] ['hm'];
					$i = $i + 9;
				}
			}


			// 计划结果,第一期不中则第二期，中则从下期开始重新推荐，如果三期都不中，则从下期重新推荐
			$data ['jiezhi'] = $jiezhi;
			$data ['jieguo'] = $jieguo;
			array_push ( $result_arr, $data );
		} else {
			// 算周期
			if ($zhouqi == 1) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				}
				array_push ( $result_arr, $data );
			} else if ($zhouqi == 2) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				}
				array_push ( $result_arr, $data );
			} else if ($zhouqi == 3) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				}
				array_push ( $result_arr, $data );
			} else if ($zhouqi == 4) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq) ) ) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
						$i = $i + 3;
					}
				}
				array_push ( $result_arr, $data );
			} else if ($zhouqi == 5) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
						$i = $i + 3;
					}
				} else if ($result_tjsj [$i + 4] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
						$i = $i + 4;
					}
				}
				array_push ( $result_arr, $data );
			}else if ($zhouqi == 6) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
						$i = $i + 3;
					}
				} else if ($result_tjsj [$i + 4] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
						$i = $i + 4;
					}
				} else if ($result_tjsj [$i + 5] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
						$i = $i + 5;
					}
				}
				array_push ( $result_arr, $data );
			}else if ($zhouqi == 7) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
						$i = $i + 3;
					}
				} else if ($result_tjsj [$i + 4] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
						$i = $i + 4;
					}
				} else if ($result_tjsj [$i + 5] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
						$i = $i + 5;
					}
				} else if ($result_tjsj [$i + 6] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期进行中...';
						$i = $i + 6;
					}
				}
				array_push ( $result_arr, $data );
			}else if ($zhouqi ==8) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
						$i = $i + 3;
					}
				} else if ($result_tjsj [$i + 4] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
						$i = $i + 4;
					}
				} else if ($result_tjsj [$i + 5] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
						$i = $i + 5;
					}
				} else if ($result_tjsj [$i + 6] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期进行中...';
						$i = $i + 6;
					}
				}else if ($result_tjsj [$i + 7] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					}  else if (in_array($result_tjsj [$i +7] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
						$i = $i + 7;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期进行中...';
						$i = $i + 7;
					}
				}
				array_push ( $result_arr, $data );
			}else if ($zhouqi ==9) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq) ) ) . '期进行中...';
						$i = $i + 3;
					}
				} else if ($result_tjsj [$i + 4] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
						$i = $i + 4;
					}
				} else if ($result_tjsj [$i + 5] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
						$i = $i + 5;
					}
				} else if ($result_tjsj [$i + 6] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期进行中...';
						$i = $i + 6;
					}
				}else if ($result_tjsj [$i + 7] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					}  else if (in_array($result_tjsj [$i +7] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
						$i = $i + 7;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期进行中...';
						$i = $i + 7;
					}
				}else if ($result_tjsj [$i + 8] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					}  else if (in_array($result_tjsj [$i +7] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
						$i = $i + 7;
					}  else if (in_array($result_tjsj [$i +8] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期-' . $result_tjsj [$i+8] ['code'] ['hm'];
						$i = $i + 8;
					}else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期进行中...';
						$i = $i + 8;
					}
				}
				array_push ( $result_arr, $data );
			}else if ($zhouqi ==10) {
				if ($result_tjsj [$i] ['code'] == null) {
					$data ['jieguo'] = '等开';
					$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
				} else if ($result_tjsj [$i + 1] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
						$i = $i + 1;
					}
				} else if ($result_tjsj [$i + 2] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
						$i = $i + 2;
					}
				} else if ($result_tjsj [$i + 3] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
						$i = $i + 3;
					}
				} else if ($result_tjsj [$i + 4] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
						$i = $i + 4;
					}
				} else if ($result_tjsj [$i + 5] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
						$i = $i + 5;
					}
				} else if ($result_tjsj [$i + 6] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期进行中...';
						$i = $i + 6;
					}
				}else if ($result_tjsj [$i + 7] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					}  else if (in_array($result_tjsj [$i +7] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
						$i = $i + 7;
					} else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期进行中...';
						$i = $i + 7;
					}
				}else if ($result_tjsj [$i + 8] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					}  else if (in_array($result_tjsj [$i +7] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
						$i = $i + 7;
					}  else if (in_array($result_tjsj [$i +8] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期-' . $result_tjsj [$i+8] ['code'] ['hm'];
						$i = $i + 8;
					}else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期进行中...';
						$i = $i + 8;
					}
				}else if ($result_tjsj [$i + 9] ['code'] == null) {
					if (in_array($result_tjsj [$i] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (in_array($result_tjsj [$i +1] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (in_array($result_tjsj [$i +2] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (in_array($result_tjsj [$i +3] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (in_array($result_tjsj [$i +4] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
						$i = $i + 4;
					}else if (in_array($result_tjsj [$i +5] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
						$i = $i + 5;
					}  else if (in_array($result_tjsj [$i +6] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
						$i = $i + 6;
					}  else if (in_array($result_tjsj [$i +7] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
						$i = $i + 7;
					}  else if (in_array($result_tjsj [$i +8] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期-' . $result_tjsj [$i+8] ['code'] ['hm'];
						$i = $i + 8;
					}  else if (in_array($result_tjsj [$i +9] ['code'][$weishu_arr['hs']],$yc_ges) == false) {
						$data ['jieguo'] = '中';
						$data ['jiezhi'] = '第10期-' . ($i_bq + 9) . '期-' . $result_tjsj [$i+9] ['code'] ['hm'];
						$i = $i + 9;
					}else {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第10期-' . ($i_bq + 9) . '期进行中...';
						$i = $i + 9;
					}
				}
				array_push ( $result_arr, $data );
			}
		}
	}
	return $result_arr;

}


// //统计中挂
function gxk3_get_tongji_result($result_arr,$zqnum,$disnum,$zhouqi,$gongshi,$weishu){
	if($disnum>6){
		$disnum=6;
	}
	//默认只留前30期
	$zqshengyu = count($result_arr)-$zqnum;
	foreach ($result_arr as $k_del => $v_del) {
		if($k_del<($zqshengyu-1)){
			unset($result_arr[$k_del]);
		}
	}
	//统计中挂个数
	$zhong = 0;
	$gua = 0;
	foreach ( $result_arr as $key => $value ) {
		if ($value ['jieguo'] == '中') {
			$zhong ++;
		} else if ($value ['jieguo'] == '挂') {
			$gua ++;
		}
	}
	$result_arr=	array_values($result_arr);
	$result_sl ['zhong'] = $zhong;
	$result_sl ['gua'] = $gua;
	$result_sl ['tatol'] = $zhong + $gua;
	$result_sl ['sl'] = number_format ( ($zhong / ($zhong + $gua)) * 100, 2, '.', '' );
	if($result_arr){
		$json_result['status_code']=100;
	}else{
		$json_result['status_code']=101;
	}
	$json_result['list']=$result_arr;
	$json_result['sl']=$result_sl;
	$json_result['disnum']=$disnum;
	$json_result['zhouqi']=$zhouqi;
	$json_result['gongshi']=$gongshi;
	$json_result['weishu']=$weishu;
	$json_result['zqnum']=$zqnum;
	
	return $json_result;
}

function gxk3_get_tongji_search($result_arr,$zqnum,$disnum,$zhouqi,$gongshi,$weishu,$sch_sl,$sch_zhouqi,$sch_max_lian_gua,$sch_lian_gua,$sch_max_lian_zhong,$sch_max_lian_zhong,$sch_lian_zhong,$sch_gs_num){
	
	if($disnum>6){
		$disnum=6;
	}
	// 只留前30期
	$zqshengyu = count ( $result_arr ) - $zqnum;
	foreach ( $result_arr as $k_del => $v_del ) {
		if ($k_del < ($zqshengyu - 1)) {
			unset ( $result_arr [$k_del] );
		}
	}
	$result_arr = array_values ( $result_arr );
	// 	dump($result_arr);
	// 统计中挂个数
	$zhong = 0;
	$gua = 0;
	$jieguo_arr = array ();
	foreach ( $result_arr as $key => $value ) {
		if ($value ['jieguo'] == '中') {
			$zhong ++;
		} else if ($value ['jieguo'] == '挂') {
			$gua ++;
		}
		if (($key + 1) != count ( $result_arr )) {
			array_push ( $jieguo_arr, $value ['jieguo'] );
		}
	}
	$lian_zhong = series_num ( $jieguo_arr, '中' );
	$lian_gua = series_num ( $jieguo_arr, '挂' );
	$result_sl ['sl'] = number_format ( ($zhong / ($zhong + $gua)) * 100, 2, '.', '' );
	$result_sl ['tatol'] = $zhong + $gua;

	$shengyu_str = $result_arr[count($result_arr)-1]['jiezhi'];
	$has_kai_num = mb_substr($shengyu_str,1,1,'utf-8')-1;
	$result_sl ['shengyu'] = $zhouqi-$has_kai_num;//周期数－已经开的期数

	$result_sl ['lian_zhong'] = $lian_zhong ['num'];
	$result_sl ['lian_gua'] = $lian_gua ['num'];
	$result_sl ['max_lian_zhong'] = $lian_zhong ['maxnum'];
	$result_sl ['max_lian_gua'] = $lian_gua ['maxnum'];
	$result_sl ['yeche'] = end ( $result_arr )['yc'];
	$result_sl ['gongshi_info'] ['disnum'] = $disnum;
	$result_sl ['gongshi_info'] ['zhouqi'] = $zhouqi;
	$result_sl ['gongshi_info'] ['gongshi'] = $gongshi;
	$result_sl ['gongshi_info'] ['weishu'] = $weishu;
	$result_sl ['gongshi_info'] ['weishu'] = $weishu;
	$result_sl ['gongshi_info'] ['zqnum'] = $zqnum;



	return $result_sl;

}

?>